function disp_del(id) {
   if(id=='-1') {alert('Error: event not found'); return;}
   if(id=='-2') {alert('Error while trying to delete this event'); return;}
   var el=$('item_'+id);
   new Effect.BlindUp(el);
   }
   
function del_event(id) {
   if (confirm('Delete this event ?')) {
      var el = $('de'+id);
      el.src = '/images/loading.gif';
      new Ajax.Request('/calendar/delete/'+id, {
        asynchronous:true,
        evalScripts:true,
        onComplete:function(r){
          disp_del(r.responseText);
          }
        });
      }
   return false;
   }

